//
//  TestShowCollectImageCVC.swift
//  CooperSwift_Example
//
//  Created by 计海峰 on 2021/12/17.
//  Copyright © 2021 CocoaPods. All rights reserved.
//

import UIKit
import CooperSwift

class TestShowCollectImageCVCModel: NSObject, CollectionCellLongPressConfigProtocol, BindKeyProtocol {
    
    func cellCls() -> UICollectionViewCell.Type {
        return TestShowCollectImageCVC.self
    }
    
    var model: Any?
    
    required init(_ model: Any?) {
        super.init()
        self.model = model
        self.cellSize = CGSize(Screen.width/3.0 - 0.01, Screen.width/3.0 - 0.01)
    }
    
}


class TestShowCollectImageCVC: UICollectionViewCell {

    @IBOutlet weak var iconIMG: UIImageView!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    
    override func bindTo(_ info: Any?) {
        self.info = info
        guard let model = info as? TestShowCollectImageCVCModel else { return }
        guard let control = model.model as? ViewControlProtocol else { return }
        control.loadAll(iconIMG)
    }

}
